package com.bw.module_main.ui.splash

import com.bw.lib_common.base.BaseViewModel
import com.bw.lib_common.utils.LoggerUtils
import com.bw.module_main.model.AdModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

/**
 * @author ytx
 * @date 2025-09-18 13:59
 * @description
 */
@HiltViewModel
class SplashViewModel @Inject constructor(private val repository: SplashRepository):BaseViewModel() {
   companion object{
       const val TAG = "SplashViewModel"
   }
    var mAdInfo:AdModel? = null //广告数据

    fun adList(){
        execute(
            action = repository.adList(),
            onFinish = {
                mAdInfo = it.data.firstOrNull()
                LoggerUtils.d(TAG,"mAdInfo:$mAdInfo")
            }
        )
    }
}